﻿using System.Collections.Generic;
using winS.UnityEditor.Undo;

namespace winS.UnityEditor.ProcessEditor
{
    public class UnmuteCommand : IUndoCommand
    {
        public string info => "取消静音";

        private readonly IEnumerable<GraphElement> graphElements;

        public UnmuteCommand(IEnumerable<GraphElement> graphElements)
        {
            this.graphElements = graphElements;
        }

        public void Redo()
        {
            foreach (var graphElement in graphElements) graphElement.Unmute();
        }
        public void Undo()
        {
            foreach (var graphElement in graphElements) graphElement.Mute();
        }
    }
}